<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

use Illuminate\Support\Facades\Route;


// 前端路由
//首页
Route::get('/' , 'home\IndexController@index');
Route::get('/shop_list1' , 'home\IndexController@shop_list1'); //特色产品
Route::get('/shop_list2' , 'home\IndexController@shop_list2'); // 列表
Route::get('/shop_list3' , 'home\IndexController@shop_list3');
Route::get('/shop_list4' , 'home\IndexController@shop_list4');

//关于我们
Route::get('/about' , 'home\IndexController@about');

//联系我们
Route::get('/contact' , 'home\IndexController@contact');

//个人信息
Route::get('/my_account' , 'home\IndexController@my_account');
Route::post('/user_info' , 'home\IndexController@user_info');
Route::post('/user_info2' , 'home\IndexController@user_info2');

//404错误页面
Route::get('/error' , 'home\IndexController@error');

//商品列表
Route::get('/shop' , 'home\ShopController@shop');

Route::get('/shop_list' , 'home\ShopController@shop_list'); // 列表
Route::get('/get_classify' , 'home\ShopController@get_classify'); //分类
Route::get('/get_color' , 'home\ShopController@get_color'); // 颜色
Route::get('/get_size' , 'home\ShopController@get_size'); // 尺寸
Route::get('/goodid' , 'home\ShopController@goodid'); // 单数据
Route::post('/wish' , 'home\ShopController@wish'); // 心愿单
Route::post('/wish_del' , 'home\ShopController@wish_del'); // 取消心愿单
Route::post('/cart' , 'home\ShopController@cart'); // 购物车
Route::post('/cart_del' , 'home\ShopController@cart_del'); // 取消购物车

// 商品详情页
Route::get('/s_product/{gid}','home\ShopController@single_product');
Route::post('/reply/{rid}','home\ShopController@reply');

//博客列表
Route::get('/blog' , 'home\BlogController@blog');
Route::get('/blog_list' , 'home\BlogController@blog_list');

//博客详情页
Route::get('/single_blog' , 'home\BlogController@single_blog');

// 商品详情页
Route::get('/s_product/{gid}','home\ShopController@single_product');
Route::post('/reply/{rid}','home\ShopController@reply');
Route::post('/cart1','home\ShopController@cart1');



//登录列表
Route::get('/login','home\LoginController@login');

Route::post('/register','home\LoginController@register');
Route::post('/login_check','home\LoginController@login_check');
Route::get('/login_out','home\LoginController@login_out');


//心愿单
Route::get('/wishlist',"Home\WishlistController@index");//心愿单列表
Route::post("/wishlist/add","Home\wishlistController@add");//添加心愿单
Route::get("/wishlist/del/{wish_id}","Home\wishlistController@delete");//删除心愿单

//购物车
Route::get("/shopcart","Home\ShopcartController@index");//购物车列表
Route::post("/shopcart/add","Home\ShopcartController@add");//添加购物车
Route::get("/shopcart/del/{cid}","Home\ShopcartController@delete");//删除购物车

//订单
Route::get("/order","Home\OrderController@index");//订单列表
Route::post("/order/add","Home\OrderController@create");//添加订单
Route::get("/order/del/{oid}","Home\OrderController@delete");//取消订单

//checkout
Route::get("/checkout","Home\CheckoutController@index");
Route::post("/checkout/city","Home\CheckoutController@city");//城市
Route::post("/checkout/town","Home\CheckoutController@town");//乡镇





//后台路由

//后台首页
Route::get('/admin','admin\IndexController@index');

//后台欢迎页面
Route::get('/admin/welcome','admin\IndexController@welcome');



//商品控制器

//商品列表html
Route::get('/admin/good_list','admin\GoodController@good_list');

//获取商品某一页的ajax方法
Route::get('/admin/toget_good_list','admin\GoodController@toget_good_list');

//获取商品总数的ajax方法
Route::get('/admin/toget_good_count','admin\GoodController@toget_good_count');

//改变商品是否推荐的ajax方法
Route::get('/admin/tochange_recommand','admin\GoodController@tochange_recommand');

//改变商品是否是新品的ajax方法
Route::get('/admin/tochange_isnew','admin\GoodController@tochange_isnew');

//商品添加页面
Route::get('/admin/add_good','admin\GoodController@add_good');

//商品添加ajax
Route::post('/admin/todo_addgood','admin\GoodController@todo_addgood');

//商品编辑页面
Route::get('/admin/edit_good','admin\GoodController@edit_good');

//商品编辑ajax
Route::post('/admin/todo_editgood','admin\GoodController@todo_editgood');

//商品删除
Route::get('/admin/todo_delgood','admin\GoodController@todo_delgood');

//批量删除商品
Route::post('/admin/todo_delgoods','admin\GoodController@todo_delgoods');

//商品多图片上传
Route::get('/admin/add_imgs','admin\GoodController@add_imgs');

//商品多图片上传执行
Route::post('/admin/todo_addimgs','admin\GoodController@todo_addimgs');

//商品图片删除
Route::get('/admin/todo_delgoodimg','admin\GoodController@todo_delgoodimg');



//订单控制器

//订单列表html
Route::get('/admin/order_list','admin\OrderController@order_list');

//获取订单某一页的ajax方法
Route::get('/admin/toget_order_list','admin\OrderController@toget_order_list');

//获取订单总数的ajax方法
Route::get('/admin/toget_order_count','admin\OrderController@toget_order_count');

//订单添加页面
Route::get('/admin/add_order','admin\OrderController@add_order');

//订单商品添加页面
Route::get('/admin/add_order_good','admin\OrderController@add_good_order');

//获取用户搜索结果异步
Route::get('/admin/select_user','admin\OrderController@select_user');

//获取商品搜索结果异步
Route::get('/admin/select_good','admin\OrderController@select_good');

//订单添加ajax
Route::post('/admin/todo_addorder','admin\OrderController@todo_addorder');

//订单商品添加ajax
Route::post('/admin/todo_addordergood','admin\OrderController@todo_addordergood');

//订单商品数量编辑
Route::get('/admin/todo_editordergood','admin\OrderController@todo_editordergood');

//订单编辑页面
Route::get('/admin/edit_order','admin\OrderController@edit_order');

//订单编辑ajax
Route::post('/admin/todo_editorder','admin\OrderController@todo_editorder');

//订单删除
Route::get('/admin/todo_delorder','admin\OrderController@todo_delorder');

//订单商品删除
Route::get('/admin/todo_delordergood','admin\OrderController@todo_delordergood');

//批量删除订单
Route::post('/admin/todo_delorders','admin\OrderController@todo_delorders');



//导航控制器

//导航列表html
Route::get('/admin/nav_list','admin\NavController@nav_list');

//删除导航
Route::get('/admin/todo_delnav','admin\NavController@todo_delnav');

//导航添加页面
Route::get('/admin/add_nav','admin\NavController@add_nav');

//导航编辑页面
Route::get('/admin/edit_nav','admin\NavController@edit_nav');

//导航添加
Route::post('/admin/todo_addnav','admin\NavController@todo_addnav');

//导航编辑
Route::post('/admin/todo_editnav','admin\NavController@todo_editnav');

//修改排序
Route::get('/admin/changeord','admin\NavController@changeord');



//商品分类控制器

//商品分类列表html
Route::get('/admin/classify_list','admin\ClassifyController@classify_list');

//获取商品分类某一页的ajax方法
Route::get('/admin/toget_classify_list','admin\ClassifyController@toget_classify_list');

//获取商品分类总数的ajax方法
Route::get('/admin/toget_classify_count','admin\ClassifyController@toget_classify_count');

//删除商品分类
Route::get('/admin/todo_delclassify','admin\ClassifyController@todo_delclassify');

//批量删除商品分类
Route::post('/admin/todo_delclassifys','admin\ClassifyController@todo_delclassifys');

//商品分类添加页面
Route::get('/admin/add_classify','admin\ClassifyController@add_classify');

//商品分类编辑页面
Route::get('/admin/edit_classify','admin\ClassifyController@edit_classify');

//商品分类添加
Route::post('/admin/todo_addclassify','admin\ClassifyController@todo_addclassify');

//商品分类编辑
Route::post('/admin/todo_editclassify','admin\ClassifyController@todo_editclassify');



//会员控制器

//会员列表
Route::get('/admin/toget_user_list' , 'admin\UserController@toget_user_list');

//获取会员总数
Route::get('/admin/toget_user_count' , 'admin\UserController@toget_user_count');

//会员添加执行
Route::post('/admin/todo_adduser' , 'admin\UserController@todo_adduser');

//会员列表页面
Route::get('/admin/user_list' , 'admin\UserController@user_list');

//会员添加页面
Route::get('/admin/user_add' , 'admin\UserController@user_add');

//会员编辑页面
Route::get('/admin/user_edit/{user_id}' , 'admin\UserController@user_edit');

//会员编辑执行
Route::post('/admin/todo_user_edit' , 'admin\UserController@todo_user_edit');

//会员删除
Route::get('/admin/todo_user_del' , 'admin\UserController@todo_user_del');

//会员批量删除
Route::post('/admin/todo_user_delall' , 'admin\UserController@todo_user_delall');

//修改会员密码页面
Route::get('/admin/user_editpwd/{user_id}' , 'admin\UserController@user_editpwd');

//会员修改密码执行
Route::post('/admin/todo_user_editpwd' , 'admin\UserController@todo_user_editpwd');



//管理员控制器

//获取某一页的管理员列表
Route::get('/admin/toget_admin_list' , 'admin\AdminController@toget_admin_list');

//获取管理员总数
Route::get('/admin/toget_admin_count' , 'admin\AdminController@toget_admin_count');

//添加管理员执行
Route::post('/admin/todo_addadmin' , 'admin\AdminController@todo_addadmin');

//管理员列表页面
Route::get('/admin/admin_list' , 'admin\AdminController@admin_list');

//管理员添加页面
Route::get('/admin/admin_add' , 'admin\AdminController@admin_add');

//管留言编辑页面
Route::get('/admin/admin_edit/{admin_id}' , 'admin\AdminController@admin_edit');

//管理员编辑执行
Route::post('/admin/todo_admin_edit' , 'admin\AdminController@todo_admin_edit');

//管理员删除
Route::get('/admin/todo_admin_del' , 'admin\AdminController@todo_admin_del');

//管理员批量删除
Route::post('/admin/todo_admin_delall' , 'admin\AdminController@todo_admin_delall');



//配置表控制器

//配置表页面
Route::get('/admin/config_list' , 'admin\ConfigController@config_list');

//修改配置表
Route::get('/admin/config_edit' , 'admin\ConfigController@config_edit');




//广告图控制器

//广告图添加执行
Route::post('/admin/todo_addbanner' , 'admin\BannerController@todo_addbanner');

//获取广告图总数
Route::get('/admin/toget_banner_count' , 'admin\BannerController@toget_banner_count');

//获取某一页的广告图列表
Route::get('/admin/toget_banner_list' , 'admin\BannerController@toget_banner_list');

//广告图列表页面
Route::get('/admin/banner_list' , 'admin\BannerController@banner_list');

//广告图添加页面
Route::get('/admin/banner_add' , 'admin\BannerController@banner_add');

//广告图编辑页面
Route::get('/admin/banner_edit/{banner_id}' , 'admin\BannerController@banner_edit');

//广告图编辑执行
Route::post('/admin/togo_banner_edit' , 'admin\BannerController@togo_banner_edit');

//广告图删除
Route::get('/admin/todo_banner_del' , 'admin\BannerController@todo_banner_del');

//广告图批量删除
Route::post('/admin/todo_banner_delall' , 'admin\BannerController@todo_banner_delall');



//友情链接控制器

//友情链接添加执行
Route::post('/admin/todo_addlink' , 'admin\LinkController@todo_addlink');

//获取友情链接总数
Route::get('/admin/toget_link_count' , 'admin\LinkController@toget_link_count');

//获取某一页的友情链接
Route::get('/admin/toget_link_list' , 'admin\LinkController@toget_link_list');

//友情链接列表页面
Route::get('/admin/link_list' , 'admin\LinkController@link_list');

//友情链接添加页面
Route::get('/admin/link_add' , 'admin\LinkController@link_add');

//友情链接编辑页面
Route::get('/admin/link_edit/{link}' , 'admin\LinkController@link_edit');

//友情链接编辑执行
Route::post('/admin/togo_link_edit' , 'admin\LinkController@togo_link_edit');

//友情链接删除
Route::get('/admin/todo_link_del' , 'admin\linkController@todo_link_del');



//后台登录页面
Route::get('/admin/login','admin\LoginController@login');

//验证码
Route::get('/admin/code','admin\LoginController@code');

//后台登录异步
Route::post('/admin/check','admin\LoginController@check');

//后台退出登录
Route::get('/admin/logout','admin\LoginController@logout');